Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add JSDoc for extras/splat ply-reader/splat-material/splat #5868

Merged
merged 7 commits into from
Dec 11, 2023

Conversation

kungfooman
Copy link
Collaborator

@kungfooman kungfooman commented Nov 29, 2023

Also adding jsconfig.js and fixing a small issue with find for UInt8Array's (it would skip a good/last result) because it used < and not <=.

Motivation is to have a better IDE experience (static type-checking and Intellisense) and also to have more types in playcanvas-extras that we can validate via RTI (dynamic type-checking for NaN's for example).

I confirm I have read the contributing guidelines and signed the Contributor License Agreement.

@kungfooman kungfooman marked this pull request as draft November 30, 2023 08:48
@kungfooman
Copy link
Collaborator Author

I think I found another bug:

image

The property app.loader.maxRetries doesn't exist, but they do exist on each containerHandler, can I just fix that here, like containerHandler.maxRetries?

@mvaligursky
Copy link
Contributor

This might be related
#5574

@kungfooman kungfooman marked this pull request as ready for review November 30, 2023 10:53
*/

/**
* @typedef {object} PlyProperty
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

do we even use these types anywhere?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yep, PlyElement is used once in ply-reader.js and three times in splat-data.js:

class SplatData {
    /** @type {import('./ply-reader').PlyElement[]} */
    elements;

    /** @type {import('./ply-reader').PlyElement} */
    vertexElement;

    /**
     * @param {import('./ply-reader').PlyElement[]} elements - The elements.
     * @param {boolean} [performZScale] - Whether to perform z scaling.
     */
    constructor(elements, performZScale = true) {

Copy link
Contributor

@mvaligursky mvaligursky left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This looks great, I don't see any problems, keen to merge. Any concerns @slimbuck ?

@mvaligursky mvaligursky added the docs Documentation related label Dec 11, 2023
Copy link
Member

@slimbuck slimbuck left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yep, looks great thanks!

@mvaligursky mvaligursky merged commit 0597df4 into playcanvas:main Dec 11, 2023
7 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
docs Documentation related
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants